loop order
MEMA Runtime Framework: Minimizing External Memory Accesses for TinyML on Microcontrollers
Sabot, Andrew, Natesh, Vikas, Kung, H. T., Ting, Wei-Te
We present the MEMA framework for the easy and quick derivation of efficient inference runtimes that minimize external memory accesses for matrix multiplication on TinyML systems. The framework accounts for hardware resource constraints and problem sizes in analytically determining optimized schedules and kernels that minimize memory accesses. MEMA provides a solution to a well-known problem in the current practice, that is, optimal schedules tend to be found only through a time consuming and heuristic search of a large scheduling space. We compare the performance of runtimes derived from MEMA to existing state-of-the-art libraries on ARM-based TinyML systems. For example, for neural network benchmarks on the ARM Cortex-M4, we achieve up to a 1.8x speedup and 44% energy reduction over CMSIS-NN.
Keyword Spotting System and Evaluation of Pruning and Quantization Methods on Low-power Edge Microcontrollers
Keyword spotting (KWS) is beneficial for voice-based user interactions with low-power devices at the edge. The edge devices are usually always-on, so edge computing brings bandwidth savings and privacy protection. The devices typically have limited memory spaces, computational performances, power and costs, for example, Cortex-M based microcontrollers. The challenge is to meet the high computation and low-latency requirements of deep learning on these devices. This paper firstly shows our small-footprint KWS system running on STM32F7 microcontroller with Cortex-M7 core @216MHz and 512KB static RAM. Our selected convolutional neural network (CNN) architecture has simplified number of operations for KWS to meet the constraint of edge devices. Our baseline system generates classification results for each 37ms including real-time audio feature extraction part. This paper further evaluates the actual performance for different pruning and quantization methods on microcontroller, including different granularity of sparsity, skipping zero weights, weight-prioritized loop order, and SIMD instruction. The result shows that for microcontrollers, there are considerable challenges for accelerate unstructured pruned models, and the structured pruning is more friendly than unstructured pruning. The result also verified that the performance improvement for quantization and SIMD instruction.
Evaluating Spatial Accelerator Architectures with Tiled Matrix-Matrix Multiplication
Moon, Gordon E., Kwon, Hyoukjun, Jeong, Geonhwa, Chatarasi, Prasanth, Rajamanickam, Sivasankaran, Krishna, Tushar
There is a growing interest in custom spatial accelerators for machine learning applications. These accelerators employ a spatial array of processing elements (PEs) interacting via custom buffer hierarchies and networks-on-chip. The efficiency of these accelerators comes from employing optimized dataflow (i.e., spatial/temporal partitioning of data across the PEs and fine-grained scheduling) strategies to optimize data reuse. The focus of this work is to evaluate these accelerator architectures using a tiled general matrix-matrix multiplication (GEMM) kernel. To do so, we develop a framework that finds optimized mappings (dataflow and tile sizes) for a tiled GEMM for a given spatial accelerator and workload combination, leveraging an analytical cost model for runtime and energy. Our evaluations over five spatial accelerators demonstrate that the tiled GEMM mappings systematically generated by our framework achieve high performance on various GEMM workloads and accelerators.
Morph: Flexible Acceleration for 3D CNN-based Video Understanding
Hegde, Kartik, Agrawal, Rohit, Yao, Yulun, Fletcher, Christopher W.
Abstract--The past several years have seen both an explosion in the use of Convolutional Neural Networks (CNNs) and the design of accelerators to make CNN inference practical. In the architecture community, the lion share of effort has targeted CNN inference for image recognition. The closely related problem of video recognition has received far less attention as an accelerator target. This is surprising, as video recognition is more computationally intensive than image recognition, and video traffic is predicted to be the majority of internet traffic in the coming years. This paper fills the gap between algorithmic and hardware advances for video recognition by providing a design space exploration and flexible architecture for accelerating 3D Convolutional Neural Networks (3D CNNs)--the core kernel in modern video understanding. When compared to (2D) CNNs used for image recognition, efficiently accelerating 3D CNNs poses a significant engineering challenge due to their large (and variable over time) memory footprint and higher dimensionality. To address these challenges, we design a novel accelerator, called Morph, that can adaptively support different spatial and temporal tiling strategies depending on the needs of each layer of each target 3D CNN. We codesign a software infrastructure alongside the Morph hardware to find good-fit parameters to control the hardware. Evaluated on state-of-the-art 3D CNNs, Morph achieves up to 3.4 (2.5 average) reduction in energy consumption and improves performance/watt by up to 5.1 (4 average) compared to a baseline 3D CNN accelerator, with an area overhead of 5%. Morph further achieves a 15.9 average energy reduction on 3D CNNs when compared to Eyeriss. The rise of Convolutional Neural Networks (CNNs) [1], [2], [3], [4] has marked tremendous progress in image recognition, advancing the state-of-the-art in tasks ranging from handwritten digit [5] to complex object recognition [6], [7]. At their core, CNNs are compute intensive, parallel dot product operations. Combined with their importance, this computation style has made CNNs a natural target for hardware ASIC acceleration, and a rich line of work has made large strides in this direction [8], [9], [10], [11], [12], [13]. Given the recent progress in image recognition, a natural question is whether similar strides have been made for the related problem of video recognition. This work was partially supported by NSF award CCF-1725734 and a DARPA SDH contract. Authors contributed equally to this work. Current state-of-the-art results are achieved using 3-dimensional (3D) CNNs, which generalize (2D) CNNs used for image recognition to account for the time dimension, thereby allowing the model to capture spatiotemporal features.